Xbasic

mongo_listCollections Function

Syntax

C result = mongo_listCollections(C mongoURL_or_connectionString, C databaseName)

Arguments

mongoURL_or_connectionStringCharacter

A Mongo AlphaDAO connection string or base URL.

databaseNameCharacter

The name of the database to list collections for.

Returns

resultCharacter

A CRLF delimited list of collection names.

Description

Lists all collections within a specific MongoDB database.

Example

dim collList as c
collList = mongo_listCollections("mongoAtlas", "sample_airbnb")
showvar(collList)

See Also